import request from '@/utils/request'

// 查询合租人列表
export function listSharedTenant(query) {
  return request({
    url: '/wx/sharedTenant/list',
    method: 'get',
    params: query
  })
}

// 查询合租人详细
export function getSharedTenant(id) {
  return request({
    url: '/wx/sharedTenant/' + id,
    method: 'get'
  })
}

// 新增合租人
export function addSharedTenant(data) {
  return request({
    url: '/wx/sharedTenant',
    method: 'post',
    data: data
  })
}

// 修改合租人
export function updateSharedTenant(data) {
  return request({
    url: '/wx/sharedTenant',
    method: 'put',
    data: data
  })
}

// 删除合租人
export function delSharedTenant(id) {
  return request({
    url: '/wx/sharedTenant/' + id,
    method: 'delete'
  })
}

// 导出合租人
export function exportSharedTenant(query) {
  return request({
    url: '/wx/sharedTenant/export',
    method: 'get',
    params: query
  })
}